package com.healthyeating.manage.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.healthyeating.common.annotation.Excel;
import com.healthyeating.common.core.domain.BaseEntity;

/**
 * 食材对象 tb_food
 * 
 * @author 段奇乐
 * @date 2024-12-03
 */
public class Food extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 食材ID，自增 */
    private Long foodId;

    /** 食材名称 */
    @Excel(name = "食材名称")
    private String foodName;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date produceDate;

    /** 保质期 */
    @Excel(name = "保质期")
    private Double shelfLife;

    /** 期望食用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "期望食用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date useTime;

    /** 食材图片 */
    @Excel(name = "食材图片")
    private String imageUrl;

    /** 食用进度 */
    @Excel(name = "食用进度")
    private Integer status;

    /** 食材类型 */
    @Excel(name = "食材类型")
    private Long foodType;

    /** 食材总量 */
    @Excel(name = "食材总量")
    private Double foodTotal;

    /** 单位 */
    @Excel(name = "单位")
    private Integer unitId;

    /** 已食用的量 */
    @Excel(name = "已食用的量")
    private Double consumption;

    /** 食材所属用户id */
    private Long userId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setFoodId(Long foodId) 
    {
        this.foodId = foodId;
    }

    public Long getFoodId() 
    {
        return foodId;
    }
    public void setFoodName(String foodName) 
    {
        this.foodName = foodName;
    }

    public String getFoodName() 
    {
        return foodName;
    }
    public void setProduceDate(Date produceDate) 
    {
        this.produceDate = produceDate;
    }

    public Date getProduceDate() 
    {
        return produceDate;
    }
    public void setShelfLife(Double shelfLife)
    {
        this.shelfLife = shelfLife;
    }

    public Double getShelfLife()
    {
        return shelfLife;
    }
    public void setUseTime(Date useTime) 
    {
        this.useTime = useTime;
    }

    public Date getUseTime() 
    {
        return useTime;
    }
    public void setImageUrl(String imageUrl) 
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl() 
    {
        return imageUrl;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setFoodType(Long foodType)
    {
        this.foodType = foodType;
    }

    public Long getFoodType()
    {
        return foodType;
    }
    public void setFoodTotal(Double foodTotal)
    {
        this.foodTotal = foodTotal;
    }

    public Double getFoodTotal()
    {
        return foodTotal;
    }
    public void setUnitId(Integer unitId) 
    {
        this.unitId = unitId;
    }

    public Integer getUnitId() 
    {
        return unitId;
    }
    public void setConsumption(Double consumption)
    {
        this.consumption = consumption;
    }

    public Double getConsumption()
    {
        return consumption;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("foodId", getFoodId())
            .append("foodName", getFoodName())
            .append("produceDate", getProduceDate())
            .append("shelfLife", getShelfLife())
            .append("createTime", getCreateTime())
            .append("useTime", getUseTime())
            .append("imageUrl", getImageUrl())
            .append("status", getStatus())
            .append("foodType", getFoodType())
            .append("foodTotal", getFoodTotal())
            .append("unitId", getUnitId())
            .append("consumption", getConsumption())
            .toString();
    }
}
